get week day name in javascript

44

javascript week day name -

let weekday = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][new Date().getDay()]
document.write(weekday)

Comments

Submit
0 Comments